var str="let's go home"
var str1=[]
var all=[]
str1=str.split(" ")
str1.forEach(item=>{
let i=item.split("").reverse().join("")
all.push(i)
})
console.log(all.join(" "))
 


